﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace JuCloudy.Platform.Structure.UI.UserControls
{
    public partial class jChildWindow : ChildWindow
    {
        public jChildWindow()
        {
            InitializeComponent();
        }

        public void Show(UIElement ui)
        {
            this.LayoutRoot.Children.Clear();
            this.LayoutRoot.Children.Add(ui);
            this.Show();
        }

        public void Show(Uri uri,String AssemblyName,String MainPageName)
        {
            JuCloudy.Framework.Interface.IStructure structure =
                Application.Current.RootVisual as JuCloudy.Framework.Interface.IStructure;
            structure.InitializeXap(uri, AssemblyName, MainPageName, this.LayoutRoot);
            this.Show();
        }
    }
}

